import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';
import 'package:mtf/R.dart';
import 'package:mtf/app/modules/success_module/success_controller.dart';
import 'package:mtf/app/theme/app_colors.dart';
import 'package:mtf/app/widget/AppBarLeftTitle.dart';
/**
 * GetX Template Generator - fb.com/htngu.99
 * */

class successPage extends GetView<successController> {
  @override
  Widget build(BuildContext context) {
    var desc=Get.arguments["desc"];
    var title=Get.arguments["title"];
    var buttonText=Get.arguments["buttonText"];
    return Scaffold(
      appBar: AppBarLeftTitle(title: title),
      body: Container(
        width: double.infinity,
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            SizedBox(height: 66,),
            SvgPicture.asset(R.assetsImgIcSvgSuccess),
            SizedBox(height: 15,),
            Text(title),
            SizedBox(height: 5,),
            Text(desc),
            Container(
              padding: EdgeInsets.symmetric(horizontal: 30,vertical: 10),
              margin: EdgeInsets.only(top: 32),
              decoration: BoxDecoration(
                borderRadius: BorderRadius.circular(24),
                color: c_f12f38,
              ),
              child: InkWell(
                  child: Text(buttonText, style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold)),
                  onTap: () {
                    controller.clickButton();
                  }
              ),
            )
          ],
        ),
      ),
    );
  }
}
